﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Rao vặt - Đà Nẵng</title>
<link rel="stylesheet" type="text/css" href="<?php echo $this->webroot; ?>/css/template.css" />
</head>

<body>
<div id="main">
	<div id="header">
    	<div id="mainheader">
    		<div id="search">
			
	   <form action="" name="form1" id="form1">
       <label><span class="style4">Tìm kiếm</span><span class="style7">:</span></label>
       <input name="textfield" type="text" id="textfield" size="33" />
       <input name="button" type="submit" id="button" value="Submit" />
     </form>
			</div>
        </div>
	
    </div>
	<div id="content"> 
    	<div id="menu">
		<div id="menu_menu">
			<table width="469" border="0">
			  <tr>
			 <td><strong><?php echo $this->Html->link(__('Trang chủ', true), array('controller' => 'subs','action'=>'news'));?></strongs></td>
			    <td><strong><?php echo $this->Html->link(__('Giới thiệu', true), array('controller' => 'introductions','action'=>'index'));?></strongs></td>
			    <td><strong><?php echo $this->Html->link(__('Đăng kí', true), array('controller' => 'customers','action'=>'registry'));?></strongs></td>
			    <td><strong><?php echo $this->Html->link(__('Liên hệ', true), array('controller' => 'contacts','action'=>'index'));?></strongs></td>
			    <td><strong><?php echo $this->Html->link(__('Hướng dẫn', true), array('controller' => 'helps','action'=>'index'));?></strongs></td>
				
			  </tr>
			</table>
		</div>
		
		</div>
	        <div id="picture">  
			<?php echo $this->Html->image('1.gif',array("alt" => "Brownies",'url' =>"http://sieuthiinox.com")); ?>
			<?php echo $this->Html->image('2.gif', array('alt' => 'CakePHP','url' =>"http://sieuthiinox.com"))?>
			<?php echo $this->Html->image('3.gif', array('alt' => 'CakePHP','url' =>"http://asin.com"))?>
			</div>
		
        <div id="detail">
			<div id="detail_left">
            	<div id="left_top">Tất cả chuyên mục</div> 
                <div id="left_bg">                
                 <?php echo $this->element('menu');?>
                 </div>
				
			 
			</div>

            <div id="detail_right">
			
            	<div id="right_top">
				<table width="700px"><tr>
				<td width="570px" height="10px">
				<?php
				if(($session->read('name')!=null))
				{
				echo "<div id='customers'> Xin chào ".$session->read('name').$this->Html->link(__('Logout', true), array('controller' => 'customers','action'=>'logout'))."</div>";
				echo "<div id='menu_customers'><span>".$this->Html->link(__('Đăng tin', true), array('controller' => 'contents','action'=>'add'))."</span><span>".$this->Html->link(__('Các tin đã đăng', true), array('controller' => 'subs','action'=>'lists'))."</span></div>";
				}else
				{
			?>
			<div id="form_login">
			<?php
			echo $this->Form->create('Customer', array( 'action' => 'login'));
			?>
			<div id="inputname">
			<?php
			echo $this->Form->input('username',array('between'=>'','label'=>'Username'));
			?>
			</div>
			<div id="inputpass">
			<div id="input_left">
			<?php
			echo $this->Form->input('password',array('between'=>'','label'=>'Password'));
			?>
			</div>
			<div id="input_right">
			<?php
			
			echo $this->Form->end('Login In');
			}
		?>
		</div>
		</div>
		</div>
	 </td>
	 <?php
	 if(($session->read('name')==null))
		{
	?>
	 <td><?php echo $this->Html->link(__('Registry', true), array('controller' => 'customers','action'=>'registry'));
	 ?></td>
	 <?php
	 }
	 ?>
	 </tr>
	 </table>
	 
	 </div>
                <div id="right_bg">
				
                  <?php echo $content_for_layout; ?>
				 
				</div>
            </div>
            
            
        </div>
        <div id="new">
        <div id="new_top"></div>
        <div id="new_bg">
			<div id="left">
				<div id="center_top">Liên kết</div>
				<div id="center_bg"><?php echo $this->element('link');?></div>
			
			</div>
			<div id="center">
				<div id="center_top">Tin mới Rao vặt</div>
				<div id="center_bg">
				<?php echo $this->element('news_rv');?>
				</div>
			</div>
			<div id="right">
				<div id="center_top">Thông tin liên hệ</div>
				<div id="center_bg"><?php echo $this->element('contact');?></div>
			
			</div>
		
		</div>
        <div id="new_bottom"></div>
        </div>
        
    </div>
    <div id="footer">
	<table width="553" border="0">
			  <tr>
			    <td><strong><?php echo $this->Html->link(__('Trang chủ', true), array('controller' => 'subs','action'=>'news'));?></strongs></td>
			    <td><strong><?php echo $this->Html->link(__('Giới thiệu', true), array('controller' => 'introductions','action'=>'index'));?></strongs></td>
			    <td><strong><?php echo $this->Html->link(__('Đăng kí', true), array('controller' => 'customers','action'=>'registry'));?></strongs></td>
			    <td><strong><?php echo $this->Html->link(__('Liên hệ', true), array('controller' => 'contacts','action'=>'index'));?></strongs></td>
			    <td><strong><?php echo $this->Html->link(__('Hướng dẫn', true), array('controller' => 'helps','action'=>'index'));?></strongs></td>
				<td><strong><?php echo $this->Html->link(__('Admin', true), array('controller' => 'users','action'=>'index'));?></strongs></td>
			  </tr>
			</table>
	</div>
</div>
</body>
</html>
